home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
lang
/
amigatalk.lha
/
intuition
/
BoopsiListBrowserTags.st
< prev
next >
Wrap
Text File
|
2002-05-06
|
14KB
|
378 lines
" -------------------------------------------------------------------- "
" BoopsiLayoutTags Class is a Singleton class that allows the user "
" to reference BOOPSI Layout class tags' hexadecimal values. "
""
" EXAMPLE: 'myTag <- layoutTags getTag: #LAYOUT_VertSpacing' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" -------------------------------------------------------------------- "
Class BoopsiLayoutTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
getTag: tagKey
^ self at: tagKey
|
privateInitializeDictionary
" MethodID's: "
self at: #LBM_ADDNODE put: 16r580001.
self at: #LBM_REMNODE put: 16r580002.
self at: #LBM_EDITNODE put: 16r580003.
self at: #LBM_SORT put: 16r580004.
self at: #LBM_SHOWCHILDREN put: 16r580005.
self at: #LBM_HIDECHILDREN put: 16r580006.
" (BOOL) If the node is to be selected. Defaults to FALSE. "
self at: #LBNA_Selected put: 16r85003501.
" (ULONG) Flags for the node. Defaults to 0. "
self at: #LBNA_Flags put: 16r85003502.
" (ULONG) User data. Defaults to NULL. "
self at: #LBNA_UserData put: 16r85003503.
" (WORD) Column in the node that the attributes
* below effect. Defaults to 0.
"
self at: #LBNA_Column put: 16r85003504.
" (STRPTR) Text to display in the column. Defaults to NULL. "
self at: #LBNCA_Text put: 16r85003505.
" (LONG *) Pointer to an integer to display in the column.
* Defaults to NULL.
"
self at: #LBNCA_Integer put: 16r85003506.
" (WORD) Column foreground pen. "
self at: #LBNCA_FGPen put: 16r85003507.
" (WORD) Column background pen. "
self at: #LBNCA_BGPen put: 16r85003508.
" (struct Image *) Image to display in the column. Defaults to NULL. "
self at: #LBNCA_Image put: 16r85003509.
" (struct Image *) Image to display in column when
* selected. Defaults to NULL.
"
self at: #LBNCA_SelImage put: 16r8500350A.
self at: #LBNCA_HorizJustify put: 16r8500350B.
" (ULONG) Column justification. Defaults to LCJ_LEFT. "
self at: #LBNCA_Justification put: 16r8500350B.
" Node generation. Defaults to 0. "
self at: #LBNA_Generation put: 16r8500350C.
" (BOOL) If this column is editable. Requires LBNCA_CopyText.
* Defaults to FALSE.
"
self at: #LBNCA_Editable put: 16r8500350D.
" (WORD) Maximum characters in an editable entry. Required when using
* LBNCA_Editable.
"
self at: #LBNCA_MaxChars put: 16r8500350E.
" Copy the LBNCA_Text contents to an internal buffer. "
self at: #LBNCA_CopyText put: 16r8500350F.
" (BOOL) this is a checkbox node "
self at: #LBNA_CheckBox put: 16r85003510.
" (BOOL) is checked if true "
self at: #LBNA_Checked put: 16r85003511.
" (ULONG) size of custom node and optimzie mempool puddles "
self at: #LBNA_NodeSize put: 16r85003512.
" (struct TagItem *) taglist sent to editable string "
self at: #LBNCA_EditTags put: 16r85003513.
" (struct Hook *) effectivly the same as gadtools listview hook "
self at: #LBNCA_RenderHook put: 16r85003514.
" (WORD) height in pixels of the hook function rendering "
self at: #LBNCA_HookHeight put: 16r85003516.
" (APTR) exec memory pool to use "
self at: #LBNA_MemPool put: 16r85003517.
" (WORD) for GetListBrowserNodeAttrs() only! "
self at: #LBNA_NumColumns put: 16r85003518.
" (UBYTE) Sets the exec node->ln_Pri "
self at: #LBNA_Priority put: 16r85003519.
" (BOOL) AllocListBrowserNodeAttrs() or SetListBrowserNodeAttrs() only! "
self at: #LBNCA_CopyInteger put: 16r8500351A.
" (BOOL) WordWrap this node's LBNCA_Text data "
self at: #LBNCA_WordWrap put: 16r8500351B.
" (ULONG) Row justification. Defaults to LRJ_BOTTOM. "
self at: #LBNCA_VertJustify put: 16r8500351C.
" Flags for the LBNA_Flags node attribute: "
self at: #LBFLG_READONLY put: 1.
self at: #LBFLG_CUSTOMPENS put: 2.
self at: #LBFLG_HASCHILDREN put: 4.
self at: #LBFLG_SHOWCHILDREN put: 8.
self at: #LBFLG_HIDDEN put: 16.
" Justification modes for the LBNA_HorizJustify
* node column attribute.
"
self at: #LCJ_LEFT put: 0.
self at: #LCJ_CENTER put: 1.
self at: #LCJ_RIGHT put: 2.
self at: #LCJ_CENTRE put: 1.
" Justification modes for the LBNA_VertJustify
* node column attribute.
"
self at: #LRJ_BOTTOM put: 0.
self at: #LRJ_CENTER put: 1.
self at: #LRJ_TOP put: 2.
self at: #LRJ_CENTRE put: 1.
" These definitions are for the LBNCA_RenderHook tag. "
" The different types of messages that a listview
* callback hook can see.
"
self at: #LB_DRAW put: 16r202. " Draw yourself, with state "
" Possible return values from a render hook. "
self at: #LBCB_OK put: 0. " callback understands this message type "
self at: #LBCB_UNKNOWN put: 1. " callback does not understand this message "
" States for LBDrawMsg.lbdm_State. "
self at: #LBR_NORMAL put: 0. " The usual "
self at: #LBR_SELECTED put: 1. " For selected gadgets "
" Possible ColumnInfo Flags "
self at: #CIF_WEIGHTED put: 0. " weighted width column "
self at: #CIF_FIXED put: 1. " fixed pixel width column "
self at: #CIF_DRAGGABLE put: 2.
self at: #CIF_NOSEPARATORS put: 4.
self at: #CIF_SORTABLE put: 8.
" v45 AllocLBColumnInfo(), SetLBColumnInfo(), GetLBColumnInfo()
* attributes.
"
self at: #LBCIA_MemPool put: 16r85003532. " (APTR) MemPool for ColumnInfo "
self at: #LBCIA_Column put: 16r85003533.
self at: #LBCIA_Title put: 16r85003534.
self at: #LBCIA_Weight put: 16r85003535.
self at: #LBCIA_Width put: 16r85003536.
self at: #LBCIA_Flags put: 16r85003537.
" Additional attributes defined by the List Browser class: "
" (LONG) Top position node. Defauts to 0. "
self at: #LISTBROWSER_Top put: 16r85003001.
self at: #LISTBROWSER_Reserved1 put: 16r85003002. " RESERVED "
" (struct List *) Defaults to ~0. "
self at: #LISTBROWSER_Labels put: 16r85003003.
" (LONG) numeric index of node currently selected; Defaults to -1. "
self at: #LISTBROWSER_Selected put: 16r85003004.
" (struct Node *) node currently seleted "
self at: #LISTBROWSER_SelectedNode put: 16r85003005.
" (BOOL) Defaults to FALSE. "
self at: #LISTBROWSER_MultiSelect put: 16r85003006.
self at: #LISTBROWSER_VertSeparators put: 16r85003007.
" (BOOL) Render column separators. Defaults to TRUE. "
self at: #LISTBROWSER_Separators put: 16r85003007.
" (struct ColumnInfo *) Defaults to NULL. "
self at: #LISTBROWSER_ColumnInfo put: 16r85003008.
self at: #LISTBROWSER_MakeVisible put: 16r85003009. " (LONG) Defaults to 0. "
self at: #LISTBROWSER_VirtualWidth put: 16r8500300A. " (WORD) Defaults to 0. "
self at: #LISTBROWSER_Borderless put: 16r8500300B. " (BOOL) Defaults to FALSE. "
self at: #LISTBROWSER_VerticalProp put: 16r8500300C. " (BOOL) Defaults to TRUE. "
self at: #LISTBROWSER_HorizontalProp put: 16r8500300D. " (BOOL) Defaults to FALSE. "
self at: #LISTBROWSER_Left put: 16r8500300E. " (WORD) Defaults to 0. "
self at: #LISTBROWSER_Reserved2 put: 16r8500300F. " RESERVED "
self at: #LISTBROWSER_AutoFit put: 16r85003010. " (BOOL) Defaults to FALSE. "
self at: #LISTBROWSER_ColumnTitles put: 16r85003011. " (BOOL) Defaults to FALSE. "
self at: #LISTBROWSER_ShowSelected put: 16r85003012. " (BOOL) Defaults to FALSE. "
self at: #LISTBROWSER_VPropTotal put: 16r85003013.
self at: #LISTBROWSER_VPropTop put: 16r85003014.
" State of the vertical prop gadget (if any). "
self at: #LISTBROWSER_VPropVisible put: 16r85003015.
self at: #LISTBROWSER_HPropTotal put: 16r85003016.
self at: #LISTBROWSER_HPropTop put: 16r85003017.
" State of the horizontal prop gadget (if any). "
self at: #LISTBROWSER_HPropVisible put: 16r85003018.
" (WORD) Returns position of mouse release. "
self at: #LISTBROWSER_MouseX put: 16r85003019.
self at: #LISTBROWSER_MouseY put: 16r8500301A.
" (BOOL) Enables ListTree mode. Defaults to FALSE. "
self at: #LISTBROWSER_Hierarchical put: 16r8500301B.
" (struct Image *) ListTree expanded branch custom image.
* Defaults to NULL.
"
self at: #LISTBROWSER_ShowImage put: 16r8500301C.
" (struct Image *) ListTree colapsed branch custom image.
* Defaults to NULL.
"
self at: #LISTBROWSER_HideImage put: 16r8500301D.
" (struct Image *) ListTree branch item custom image. Defaults to NULL. "
self at: #LISTBROWSER_LeafImage put: 16r8500301E.
" (BOOL) See autodocs for Intuition V37 bug. Defaults to TRUE. "
self at: #LISTBROWSER_ScrollRaster put: 16r8500301F.
self at: #LISTBROWSER_Spacing put: 16r85003020. " (WORD) Defaults to 0. "
self at: #LISTBROWSER_Editable put: 16r85003021. " (WORD) Defaults to FALSE. "
self at: #LISTBROWSER_EditNode put: 16r85003023. " (LONG) Specify a node to edit. "
self at: #LISTBROWSER_EditColumn put: 16r85003024. " (WORD) Specify a column to edit "
" (struct TagItem *) Taglist passed to editible node string gadget.
* Defaults to NULL.
"
self at: #LISTBROWSER_EditTags put: 16r85003027.
" (ULONG) See possible values below. "
self at: #LISTBROWSER_Position put: 16r85003022.
" (ULONG) See possible values below. "
self at: #LISTBROWSER_RelEvent put: 16r85003025.
" (LONG) Number of selected nodes. "
self at: #LISTBROWSER_NumSelected put: 16r85003026.
" (WORD) Column number clicked on. "
self at: #LISTBROWSER_RelColumn put: 16r85003028.
" (BOOL) Show horizontal node separators "
self at: #LISTBROWSER_HorizSeparators put: 16r85003029.
" (struct Image *) Custom checkbox image, Checked state. "
self at: #LISTBROWSER_CheckImage put: 16r8500302A.
" (struct Image *) Custom checkbox image, UnChecked state. "
self at: #LISTBROWSER_UncheckedImage put: 16r8500302B.
self at: #LISTBROWSER_TotalNodes put: 16r8500302C. " (LONG) Total node count. "
" (LONG) Minimum Node size for custom MemPool custom node optimization "
self at: #LISTBROWSER_MinNodeSize put: 16r8500302D.
" (BOOL) Allow column-title bar clicking. "
self at: #LISTBROWSER_TitleClickable put: 16r8500302E.
" (LONG) Minimum visible node count. This is a causes the
* minimum domain to be large enough to hold the specified number of
* nodes using the the estimated average node height. Note, ESTIMATED,
* this is not garanteed results. The result may be slightly more or
* less than specified, and potentially alot greater if other objects
* within the layout group cause the listbrowser to layout larger
* than its minimum domain.
"
self at: #LISTBROWSER_MinVisible put: 16r8500302F.
self at: #LISTBROWSER_Reserved6 put: 16r85003030. " RESERVED "
self at: #LISTBROWSER_Reserved7 put: 16r85003031. " RESERVED "
" (LONG) When set TRUE, SHIFT key is NOT required for multi-select. "
self at: #LISTBROWSER_PersistSelect put: 16r85003032.
" (LONG) Keyboard Cursor Selected Node Number "
self at: #LISTBROWSER_CursorSelect put: 16r85003033.
" (struct Node *) Keyboard Cursor Selected Node "
self at: #LISTBROWSER_CursorNode put: 16r85003034.
" (BOOL) Causes use of mask planes, and turns off custom pen support "
" The improvement with deep ECS or AGA display is *HUGE*. "
self at: #LISTBROWSER_FastRender put: 16r85003035.
" (LONG) Total visible node count. "
self at: #LISTBROWSER_TotalVisibleNodes put: 16r85003036.
" (BOOL) Enable word wrap of text nodes "
self at: #LISTBROWSER_WrapText put: 16r85003037.
" Possible values for LISTBROWSER_Position: "
self at: #LBP_LINEUP put: 1.
self at: #LBP_LINEDOWN put: 2.
self at: #LBP_PAGEUP put: 3.
self at: #LBP_PAGEDOWN put: 4.
self at: #LBP_TOP put: 5.
self at: #LBP_BOTTOM put: 6.
self at: #LBP_SHIFTLEFT put: 10.
self at: #LBP_SHIFTRIGHT put: 11.
self at: #LBP_LEFTEDGE put: 12.
self at: #LBP_RIGHTEDGE put: 13.
" Possible values for LISTBROWSER_RelEvent: "
self at: #LBRE_NORMAL put: 1.
self at: #LBRE_HIDECHILDREN put: 2.
self at: #LBRE_SHOWCHILDREN put: 4.
self at: #LBRE_EDIT put: 8.
self at: #LBRE_DOUBLECLICK put: 16.
self at: #LBRE_CHECKED put: 32.
self at: #LBRE_UNCHECKED put: 64.
self at: #LBRE_TITLECLICK put: 128.
self at: #LBRE_COLUMNADJUST put: 256.
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self privateInitializeDictionary.
].
^ self "or ^ uniqueInstance??"
]